package cn.remexs.flink.udf.geo;

import cn.remexs.flink.udf.GeoUtils;
import org.apache.flink.table.functions.ScalarFunction;

/**
 * 坐标转换
 */
public class TransWkt extends ScalarFunction {
    public TransWkt() {
    }

    public String eval(String source, String target, String wkt, Boolean is3D) {
        try {
            if (wkt == null) return null;
            return GeoUtils.transWkt(source, target, wkt, is3D);
        } catch (Exception e) {
            return null;
        }

    }

}
